package org.berlin.octane2m.kernel.types;

/**
 * The system image table lists all programs that are part of the boot image. 
 * The order of the entries here MUST agree with the order of the programs
 * in the boot image and all kernel tasks must come first.
 * Each entry provides the process number, flags, quantum size (qs), scheduling
 * queue, allowed traps, ipc mask, and a name for the process table. The 
 * initial program counter and stack size is also provided for kernel tasks.
 */
public class BootImage {
    
    /**
     * process number to use. 
     */
    private int procNr;
    
    /**
     * process flags.
     */
    private int flags;
    
    /**
     * quantum (tick count).
     */
    private char quantum;
    
    /**
     * scheduling priority.
     */
    private int priority;
    
    /**
     * stack size for tasks.
     */
    private int stksize; 
    
    /**
     * allowed system call traps.
     */
    private short trapMask;
    
    /**
     * system call protection.
     */
    private long callMask;
    
    /**
     * name in process table.
     */
    private String procName;

    public BootImage() {
        super();
    }
    
    public BootImage(final ) {
        // Set : // process nr,   pc, flags, qs,  queue, stack, traps, ipcto, call,  names //
        this.setProcNr(procNr);
        this.setFlags(flags);
        this.setStksize(stksize);
        this.setTrapMask(trapMask);
        this.setCallMask(callMask);
        this.setProcName(procName);
    }
    
    /**
     * @return the procNr
     */
    public int getProcNr() {
        return procNr;
    }

    /**
     * @param procNr the procNr to set
     */
    public void setProcNr(int procNr) {
        this.procNr = procNr;
    }

    /**
     * @return the flags
     */
    public int getFlags() {
        return flags;
    }

    /**
     * @param flags the flags to set
     */
    public void setFlags(int flags) {
        this.flags = flags;
    }

    /**
     * @return the quantum
     */
    public char getQuantum() {
        return quantum;
    }

    /**
     * @param quantum the quantum to set
     */
    public void setQuantum(char quantum) {
        this.quantum = quantum;
    }

    /**
     * @return the priority
     */
    public int getPriority() {
        return priority;
    }

    /**
     * @param priority the priority to set
     */
    public void setPriority(int priority) {
        this.priority = priority;
    }

    /**
     * @return the stksize
     */
    public int getStksize() {
        return stksize;
    }

    /**
     * @param stksize the stksize to set
     */
    public void setStksize(int stksize) {
        this.stksize = stksize;
    }

    /**
     * @return the trapMask
     */
    public short getTrapMask() {
        return trapMask;
    }

    /**
     * @param trapMask the trapMask to set
     */
    public void setTrapMask(short trapMask) {
        this.trapMask = trapMask;
    }

    /**
     * @return the callMask
     */
    public long getCallMask() {
        return callMask;
    }

    /**
     * @param callMask the callMask to set
     */
    public void setCallMask(long callMask) {
        this.callMask = callMask;
    }

    /**
     * @return the procName
     */
    public String getProcName() {
        return procName;
    }

    /**
     * @param procName the procName to set
     */
    public void setProcName(String procName) {
        this.procName = procName;
    }
      
} // End of the class //
